{% extends 'usercenter-base.html' %}
{% block title %}我的消息- 慕学在线网{% endblock %}
{% load staticfiles %}
{% block custom_bread %}
     <section>
        <div class="wp">
            <ul  class="crumbs">
                <li><a href="{% url 'index' %}">首页</a>></li>
                <li><a href="{% url 'users:info' %}">个人中心</a>></li>
                <li>我的消息</li>
            </ul>
        </div>
    </section>
{% endblock %}
{% block custom_css %}
<style>
a{
    color: black;
}
.messagelist a:hover{
color: red;
}
</style>

{% endblock %}
{% block rigt_form %}
    <div class="right" >
		<div class="personal_des Releasecont">
			<div class="head">
				<h1>我的消息</h1>
			</div>

		</div>
		<div class="personal_des permessage">
			<div class="head">
				<ul class="tab_header messagehead">
					<li class="active"><a href="{% url 'users:messages' %}">个人消息</a> </li>
				</ul>
			</div>
			<div class="messagelist">
                    {% for message in messages %}
                    <div class="messages">
                        <div class="fr">
                            <div class="top"><span class="fl time">{{ message.add_time }}</span><span class="fr btn foldbtn"></span></div>
                            <p >
                                {{ message.message | safe}}
                            </p>
                        </div>
                    </div>
                    {% endfor %}


			</div>


			<div class="pageturn pagerright">
                <ul class="pagelist">
             {% if messages.has_previous  %}
                 <li class="long"><a href="?page={{messages.previous_page_number}}">上一页</a></li>
            {%endif%}

                {% for i in   messages.paginator.page_range %}
                 {%if i == messages.number  %}
                     <li class="active"><a href="?page={{ i }}">{{i }}</a></li>
                    {% else %}
                      <li><a href="?page={{ i }}" class="page">{{ i }}</a></li>
                    {% endif %}
                {% endfor %}
                {% if messages.has_next  %}
                 <li class="long"><a href="?page={{messages.next_page_number}}">下一页</a></li>
            {%endif%}
            </ul>
            </div>
		</div>

	</div>
{% endblock %}


